/*
 * Copyright (C) 2011-2020 ShenZhen iBOXCHAIN Information Technology Co.,Ltd.
 * All right reserved.
 * This software is the confidential and proprietary
 * information of iBOXCHAIN Company of China.
 * ("Confidential Information"). You shall not disclose
 * such Confidential Information and shall use it only
 *  in accordance with the terms of the contract agreement
 *  you entered into with iBOXCHAIN inc.
 *
 */

package com.demo.simpletestapp.webview

import android.content.Context
import android.view.Gravity
import android.widget.Toast
import com.blankj.utilcode.util.AppUtils
import com.demo.simpletestapp.SimpleApp

/**
 * 使用统一的toast
 */
object UnifyToastUtil {

     fun showTextShort(msg: String, context: Context = SimpleApp.instance){
        val toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT)
        toast.setText(msg)
        toast.setGravity(Gravity.CENTER, 0, 0)
        toast.show()
    }

    fun showTextShortLong(msg: String, context: Context = SimpleApp.instance){
        val toast = Toast.makeText(context, msg, Toast.LENGTH_LONG)
        toast.setText(msg)
        toast.setGravity(Gravity.CENTER, 0, 0)
        toast.show()
    }
}